import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase = "DBshop032-删除特定商品标签流程"

str3="超级商品"

# 1.点击“删除”按钮，确定删除，删除成功。
firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,"商品管理","商品标签","特定商品标签")
firefox.find_element_by_xpath("//td[text()='%s']/following-sibling::td[3]/a[2]"%str3).click()
firefox.switch_to_alert().accept()
# 断言
str1=firefox.find_element_by_xpath("//div[@class='admin_body']").text
if re.search(str3,str1):
    writeLog("%s 测试失败" % testCase)
    getPhoto(firefox)
else:
    writeLog("%s 测试通过" % testCase)
firefox.quit()